#!bash

set -x

source utility.sh

cwd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
PID_FILE=pid
root=${PWD##*/}

rm -f log

kill_running

chmod +x $cwd/start.sh
sleep 1
nohup $cwd/start.sh >/dev/null 2>&1 &
PID=$!
echo "${PID}" > "${PID_FILE}"
sleep 1
ps aux | grep python

sleep 4
tail -f log
